﻿using Assets.Script.gamecore.action;
namespace Assets.Script.gamecore.unit
{
    public class BaseObject : UnityObject
    {
        protected MoveTo _movetoAction = null;

        protected ActionManager _actionManager = null;

        public BaseObject()
        {
        }

        void init()
        {
            _actionManager = new ActionManager();
        }

        public void DoMoveTo(FixVector3 startPos,FixVector3 endPos,Fix64 time)
        {
            if(null == _movetoAction)
            {
                _movetoAction = new MoveTo(this,startPos, endPos, time);
                _actionManager.AddAction(_movetoAction);
            }
        }
    }
}
